# plug/reboot.py
#
#

""" reboot the bot """

__copyright__ = 'this file is in the public domain'

from ommbot.world import add_cmnd, add_example, mainhandler, get_fleet, \
                         get_plugs
from ommbot.generic import reboot

def handle_reboot(bot, ievent):
    get_fleet().exitall()
    get_plugs().exit()
    mainhandler.put(0, reboot)

add_cmnd('reboot', handle_reboot, 'OPER')
add_example('reboot', 'reboot the bot', 'reboot')
